package kp.rpc.spring.boot.stater.annotation;

import kp.rpc.constants.RpcConstant;
import kp.rpc.fault.retry.key.RetryStrategyKey;
import kp.rpc.fault.tolerant.key.TolerantStrategyKey;
import kp.rpc.loadbalancer.key.LoadBalancerKey;
import org.springframework.stereotype.Component;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface KpRpcReference {
    Class<?> interfaceClass() default void.class;

    /**
     * 版本号
     */
    String version() default RpcConstant.DEFAULT_SERVICE_VERSION;

    String loadBalancer() default LoadBalancerKey.ROUND_ROBIN;

    String retryStrategy() default RetryStrategyKey.FIXED_INTERVAL;

    String tolerantStrategy() default TolerantStrategyKey.FAIL_FAST;

    boolean mock() default false;

}
